// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIUrlClassifierStreamUpdater.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// This is a class to manage large table updates from the server.  Rather than
    /// downloading the whole update and then updating the sqlite database, we
    /// update tables as the data is streaming in.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("e1797597-f4d6-4dd3-a1e1-745ad352cd80")]
	public interface nsIUrlClassifierStreamUpdater
	{
		
		/// <summary>
        /// Try to download updates from updateUrl. If an update is already in
        /// progress, queues the requested update. This is used in nsIUrlListManager
        /// as well as in testing.
        /// @param aRequestTables Comma-separated list of tables included in this
        /// update.
        /// @param aRequestBody The body for the request.
        /// @param aUpdateUrl The plaintext url from which to request updates.
        /// @param aSuccessCallback Called after a successful update.
        /// @param aUpdateErrorCallback Called for problems applying the update
        /// @param aDownloadErrorCallback Called if we get an http error or a
        /// connection refused error.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool DownloadUpdates([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aRequestTables, [MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aRequestBody, [MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aUpdateUrl, [MarshalAs(UnmanagedType.Interface)] nsIUrlClassifierCallback aSuccessCallback, [MarshalAs(UnmanagedType.Interface)] nsIUrlClassifierCallback aUpdateErrorCallback, [MarshalAs(UnmanagedType.Interface)] nsIUrlClassifierCallback aDownloadErrorCallback);
	}
}
